﻿<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="layout.html" />
  <xi:include href="macros.html" />
  <head>
    <title>${_('MailArchive')}</title>
  </head>

  <body>

    <div id="content" class="mailarc">
     <form id="prefs" method="get" action="">
       <py:for each="ml in mls">
       <div class="category_name">$ml.name</div>
       <ul>
       <py:for each="subitem in ml.yearmonths">
         <li class="category_li">
         <py:choose test="subitem.href">
           <py:when test="">
             <a href="$subitem.href">$subitem.year/$subitem.month ($subitem.count)</a>
           </py:when>
           <py:otherwise>
             $subitem.year/$subitem.month ($subitem.count)
           </py:otherwise>
         </py:choose>
         </li>
       </py:for>
       </ul>
       </py:for>
     </form>

     <h2>
       $nameの$year年$month月のメール <span class="numresults" py:if="page_results">(${page_results.displayed_items()})</span>
     </h2>
 
 
<py:def function="mailarc_row(rows,depth)">
  <py:for each="message in rows">
	<li class="thread_li">
    <py:choose>
     <a py:when="message.attachment" class="thread_subject_clip"
        href="$message.mail_href">$message.subject</a>
     <a py:otherwise=""
        href="$message.mail_href">$message.subject</a>
    </py:choose>
    <br />
    
    <span class="thread_from">$message.fromname</span>
    <span class="thread_senddate">$message.senddate</span>

    <ul py:if="len(message.children)>0" class="thread_ul">
    ${mailarc_row(message.children,depth+1)}
    </ul>
    </li>
  </py:for>
</py:def>

<xi:include py:with="paginator = page_results" href="page_index.html" />
<div id="mail_thread">
<ul py:if="len(messages.children)>0" class="thread_ul">
${mailarc_row(messages.children,0)}
</ul>
</div>
<xi:include py:with="paginator = page_results" href="page_index.html" />


 
 



      <div id="help">
      </div>

    </div>
  </body>
</html>


